package com.my.test.design.observer;

public abstract class Subject {

    private String state;

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    /**
     * 添加观察者
     * @param obs
     */
    public abstract void addObserver (Observer obs);

    /**
     * 删除观察者
     * @param obs
     */
    public abstract void deleteObserver (Observer obs);


    /**
     * 通知
     */
    public abstract void notifyAllObserver();


}
